<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
    <th:block th:include="include_mobile :: header('辖区内信息')" />

</head>
<body class="grayw-bg full-height-layout" >

<div class="wrapper1">
    <div th:replace="include_mobile :: top" ></div>
    <div class="container-wrapper">
        <div class="row">
            <ol class="breadcrumb">
                <li><i class="fa fa-map-marker"></i> <a th:href="@{/jjm/shi/mobile}">市</a></li>
                <li><a th:href="@{/jjm/xian/mobile(id=${xianInfo.deptId})}" th:text="${xianInfo.deptName}"></a></li>
                <li><a th:href="@{/jjm/xiang/mobile(id=${xiangInfo.deptId})}" th:text="${xiangInfo.deptName}"></a></li>
                <li><a th:href="@{/jjm/village/mobile(id=${villageInfo.deptId})}" th:text="${villageInfo.deptName}"></a></li>
            </ol>
        </div>
        <div class="row">
            <div class="col-md-12 select-table table-bordered">
                <div class="btn-group-sm">
                    <a class="btn btn-primary" onclick="$.table.exportExcel()">
                        <i th:text="下载表格"  class="fa fa-download"></i>
                    </a>
                    <label class="col-md-offset-1" th:text="总购洁净煤：+ *{cunTotalOrder==null ? '0' : cunTotalOrder}+吨"></label>
                </div>
                <table id="bootstrap-table"></table>
            </div>
        </div>
<!--        <div class="row">-->
<!--            <label th:each="dept : ${deptList}" th:value="${dept.deptId}" style="margin:5px">-->
<!--                <a class="btn btn-success dept-info" th:text="${dept.deptName}" th:href="@{/jjm/village/mobile(id=${dept.deptId})}" ></a>-->
<!--            </label>-->

<!--        </div>-->
    </div>
</div>
<th:block th:include="include_mobile :: footer" />
    <script th:inline="javascript">
        var villageId = [[${villageId}]];
        var prefix = ctx + "jjm/clientUser";

        $(function() {

            var options = {
                url : prefix + "/listVillage?villageId="+villageId,
                exportUrl: prefix + "/exportVillage?villageId="+villageId,
                modalName: [[${villageInfo.deptName}]]+"辖区内信息",
                showSearch: false,
                showRefresh: false,
                showToggle: false,
                showColumns: false,
                columns:[
                    [{
                        field: 'villageId',
                        title: '编号',
                        rowspan : 2,
                        align: "center",
                        valign: "middle"
                    }, {
                        field: 'name',
                        title: '村',
                        rowspan : 2,
                        align: "center",
                        valign: "middle"
                    }, {
                        field: 'population',
                        title: titleValue('精准确村确户总户数'),
                        rowspan : 2,
                        align: "center",
                        valign: "middle"
                    }, {
                        field: 'residents',
                        title: titleValue('常住人口户数'),
                        rowspan : 2,
                        align: "center",
                        valign: "middle"
                    }, {
                        field: 'jjm',
                        title: titleValue('洁净取暖户数'),
                        rowspan : 2,
                        align: "center",
                        valign: "middle"
                    }, {
                        field: 'notjjm',
                        title: titleValue('洁净煤未入户数'),
                        rowspan : 2,
                        align: "center",
                        valign: "middle"
                    }, {
                        field: 'others',
                        title: titleValue('采用其他方式取暖户数'),
                        rowspan : 2,
                        align: "center",
                        valign: "middle"
                    }, {
                        field: 'buqu',
                        title: titleValue('冬季不取暖户数'),
                        rowspan : 2,
                        align: "center",
                        valign: "middle"
                    },{
                        field: 'swz',
                        title: titleValue('生物质取暖户数'),
                        rowspan : 2,
                        align: "center",
                        valign: "middle"
                    }, {
                        field: '',
                        title: '村',
                        align: 'center',
                        colspan : 2,
                        valign: "middle"
                    },{
                        field: 'orderAmount',
                        title: titleValue('总购洁净煤数(吨)'),
                        rowspan : 2,
                        align: "center",
                        valign: "middle"
                    },{
                        title: '操作',
                        align: 'center',
                        rowspan : 2,
                        valign: "middle",
                        formatter: function(value, row, index) {
                            var actions = [];
                            actions.push('<a class="btn btn-success btn-xs" href="/jjm/clientUser/mobile?villageId=[[${villageId}]]"><i class="fa fa-edit"></i>查看详情</a> ');
                            return actions.join('');
                        }
                    }],[
                        {
                            field: 'baolianrenCount',
                            title: titleValue('村级包联人数'),
                            rowspan : 1,
                            align: "center",
                            valign: "middle"
                        }, {
                            field: 'baolianhuCount',
                            title: titleValue('包联户数'),
                            valign: "middle"
                        }
                    ]]
            };
            $.table.init(options);
        });
    </script>
</body>
</html>